﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Engine
{
    public static class LocationConverter
    {
        /// Formats:
        /// http://gis-lab.info/qa/dms2dd.html
        /// DD.DDDDD
        /// DD MM SS.SS
        /// DD MM.MMMM


        #region Private 
        private static float a(int DD, int MM, float SS)
        {
            return DD + ((MM / 60) + (SS / 3600));
        }

        private static float b(int DD, float MM)
        {
            return DD + (MM / 60);
        }

        private static float c(float DDDDD)
        {
            int dd = (int)Math.Round(DDDDD);
            int mm = (int)Math.Round((DDDDD - dd) * 60);
            float ss = ((DDDDD - dd) * 60 - mm) * 60;
            return ss;
        }
        #endregion

    }
}
